<template>
	<view >
		<view class="mybody">
			<!-- 大赛标题 -->
			<view class="mytitle">{{noticeInfo.title}}</view>
			<image class="img" mode="aspectFit" :src="noticeInfo.oneImage"></image>
			<!-- 大赛内容 -->
			<view >
				{{noticeInfo.content}}
			</view>
			<image class="img" mode="aspectFit" :src="noticeInfo.twoImage"></image>
		</view>
	</view>
</template>

<script>
	import {notice} from "../../apis"
	export default{
		data(){
			return{
				noticeInfo:{}
			}
		},
		onLoad(option) {
			console.log(option)
			
			uni.showLoading({
				title:'加载中'
			})
			// console.log(option)
			// console.log(option.index)
			notice({
				"type":option.number
			}).then((res)=>{
				let [err,data]=res
				if(err!=null){
					console.log(err)
				}
				// console.log(data)
				this.noticeInfo = data.data.data[option.index]
				console.log(typeof this.noticeInfo)
				 console.log(this.noticeInfo)
				// console.log("大赛通知："+this.noticeInfo[option.index].id)
				uni.hideLoading();
			})
		},
		methods:{
			
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		// width: 97%;
		// padding-top: 15px;
		// padding-bottom: 15px;
		// background-color: #ff0000;
		// margin: 0 auto;
		// box-shadow: 2px 2px 2px #ccc;
		.inner{
			width: 92%;
			background-color: #fff;
			box-shadow: 2px 2px 2px #fff;
			margin: 0 auto;
			padding: 5px;
			.title{
				// width: 80%;
				color: red;
				margin: 0 auto;
				padding: 10px;
				// border: 1px solid red;
				font-size: 14px;
				font-weight: 900;
			}
			.tet{
				width: 94%;
				font-size: 12px;
				font-weight: 700;
				border: 2px dashed #ccc;
				margin: 0 auto;
				box-sizing: border-box;
				padding: 10px;
			}
		}
		
	}
	
	.img{
		width: 100%;
		height: 200px;
	}
	
	.mybody{
		padding: 20rpx;
	}
	
	.mytitle{
		font-size: large;
		font-weight: bold;
		text-align: center;
	}
	
</style>
